<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title><s:property value="title"/></title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">
	
	<link href="css/bbs.css" rel="stylesheet" type="text/css"/>
	
	<style type="text/css">
		.mytable{
			width: 90%;
			padding: 0; 
			margin: 0; 
		}
		.mytable th { 
			font-size: 13px;
			color: #4f6b72; 
			border-right: 1px solid #C1DAD7; 
			border-bottom: 1px solid #C1DAD7; 
			border-top: 1px solid #C1DAD7; 
			letter-spacing: 2px; 
			text-transform: uppercase; 
			text-align: left; 
			padding: 6px 6px 6px 12px; 
			background: #CAE8EA  no-repeat; 
		}
		.mytable td { 
			border-right: 1px solid #C1DAD7; 
			border-bottom: 1px solid #C1DAD7;
			font-size:11px; 
			padding: 6px 6px 6px 12px;
			color: #4f6b72; 
		} 
	</style>

  </head>
  
  <body>
    <s:include value="/top.jsp"></s:include>
    
    	<div class="main_div">
    		<br/>
    			<div class="module_div">
    				<div style="width: 100%; height: 30px; background-repeat: repeat-x;">
    					<p style="color: white; font-size: 13px; margin: 5px;">
		    			<s:property value="title"/>
		    			</p>
		    			<br/>
		    		</div>
		    		
		    		<div class="table_div">
		    			<br/>
		    			<table class="mytable" cellspacing="0">
		    				<tr> 
							<th scope="col" style="width: 20%;">简介</th> 
							<th scope="col">主要内容</th>
							</tr> 
							<tr>
							
							<td class="row">
								<span><strong>昵称</strong>：${ user.account }</span>
								<br/><br/>
								<div style="width: 120px; height: 120px;">
									<c:if test="${user.headImageSrc == null || user.headImageSrc == ''}">
				    					<img src="images/default_user_head_img.png"></img>
				    				</c:if>
				    				<c:if test="${user.headImageSrc != null}">
				    					<img id="img" width="120" height="120" src="userUploadFile/${user.headImageSrc }"></img>
				    				</c:if>
								</div>
								<br/>
								<span>
									<strong>会员等级</strong>：<br/>
									<strong>会员积分</strong>：<br/>
									<strong>最后一次活动时间</strong>：<br/>${ user.dateLastActived }<br/>
								</span>
								<br/>
								<s:a href="user_selectUser?selectAccount=%{#request.selectAccount}">基本信息</s:a><br/>
								<s:a href="user_addToFriend?selectAccount=%{#request.selectAccount}">加为好友</s:a><br/>
								<s:a href="user_selectUserPosts?selectAccount=%{#request.selectAccount}">相关帖子</s:a><br/>
								<s:a href="user_giveToMessageUI?selectAccount=%{#request.selectAccount}">给他（她）留言</s:a><br/>
							</td> 
							
							<td class="row">
								<div style="width: 100%;">
									<table cellspacing="0" class="mytable">
										<tr> 
										<th scope="col" style="width: 50px;">精华帖</th> 
										<th scope="col" style="width: 45%;">主题</th>
										<th scope="col">创建时间</th>
										<th scope="col">回复</th>
										<th scope="col">举报</th>
										<th scope="col">阅读</th>
										</tr>
										<s:iterator id="post" value="posts">
											<tr>
												<td>
													<s:if test="#post.selectCount >= 10 && #post.replyCount >=1">
							    						<span style="color: red;">是</span>
							    					</s:if>
							    					<s:else>
							    						<span>否</span>
							    					</s:else>
												</td>
												<td><s:a href="reply_list?post_id=%{#post.id}">${ post.name }</s:a></td>
												<td>${ post.dateCreated }</td>
												<td>${ post.replyCount }</td>
												<td>${ post.reportCount }</td>
												<td>${ post.selectCount }</td>
											</tr>
										</s:iterator>
									</table>
								</div>
							</td>
							</tr> 
		    			</table>
		    			<br/>
		    		</div>
    				
    			</div>
    		<br/>
    	</div>
    
    <s:include value="/bottom.jsp"></s:include>
  </body>
</html>
